import { UnwrapRef, VNode } from 'vue'
// import { CrudSchema } from '@/hooks/web/useCrudSchemas'

// 编辑，详情 方法
export type ActionType = ((row: any, actionType: string) => void) | undefined
// 删除方法
export type DelDataType = ((row: any) => void) | undefined

// input 标签
export type TagsObjectType = {
  tagsList: UnwrapRef<string[]>
  handleTagsButtonClick: (event: MouseEvent) => void
  removeTag: (tag: string) => void
}
// select
export interface Selecter {
  name: string
  code: string
  selected: boolean
}
// input select
export type SelectOptionType = {
  selectedOption: Selecter[]
  handleOptionButtonClick: (event: MouseEvent) => void
  removeOption: (tag: string) => void
}

export interface ActionButtonsTemplate {
  length: number
  template: (data: any) => VNode
}

export interface SchemaConfig {
  actionButtonsTemplate?: ActionButtonsTemplate
  fieldEnum?: any
  tableDialogCurdSchema?: any
  tableDialogStoreID?: string
  selectEnum?: any
  operatorList?: any
  supplierList?: any
  tableDialogStore?: any
  goodsTableDialogCurdSchema?: any
  goodsTableDialogStoreID?: string
  tagsObj?: any
}

export type SelectOption = {
  label: string
  value: string | number
}
